<?php

/**
 * Chat entry form.
 *
 * @author    Mon Zafra <monzee at gmail>
 * @copyright (c)2009 Mon Zafra
 * @license   http://mz-project.googlecode.com/svn/trunk/LICENSE    MIT License
 * @version   SVN: $Id: EntryForm.php 12 2009-02-28 13:39:31Z monzee $
 */
class Chat_EntryForm extends Zend_Form
{
    public function init()
    {
        $decors = array(
            array('ViewHelper', array('separator' => '')),
            array('Label', array('separator' => '')),
            array('Errors', array('separator' => '')),
        );
        $this->setAttrib('class', 'mz-dl-form')

            ->addElement('text', 'name', array(
                'class' => 'text',
                'label' => 'Name:',
                'required' => true,
                'decorators' => $decors,
            ))

            ->addElement('text', 'url', array(
                'class' => 'text',
                'label' => 'Website:',
                'value' => 'http://',
                'decorators' => $decors,
            ))

            ->addElement('text', 'message', array(
                'class' => 'text',
                'label' => 'Message:',
                'required' => true,
                'decorators' => $decors,
            ))

            ->addElement('submit', 'submit', array(
                'label' => 'Add message',
                'ignore' => true,
                'decorators' => $decors,
            ));
    }

}
